<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>The small3d library: small3d::BinaryFile Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo_s.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">The small3d library
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacesmall3d.html">small3d</a></li><li class="navelem"><a class="el" href="classsmall3d_1_1_binary_file.html">BinaryFile</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsmall3d_1_1_binary_file-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">small3d::BinaryFile Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Native model file loader. The model file loaded has to have been produced by converting a file in a supported format to a <a class="el" href="namespacesmall3d.html">small3d</a> native binary file using the format converter program, s3dfc, produced by this project's build scripts, for example by running s3dfc car.glb car.bin (this would convert a car gltf (.glb) model file to a native binary model file) ATTENTION: Unfortunately the native binary files have issues across architectures. So for example binaries created on Windows do not work on Linux. They need to be created and tested separately for each.  
 <a href="classsmall3d_1_1_binary_file.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_binary_file_8hpp_source.html">BinaryFile.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for small3d::BinaryFile:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsmall3d_1_1_binary_file.png" usemap="#small3d::BinaryFile_map" alt=""/>
  <map id="small3d::BinaryFile_map" name="small3d::BinaryFile_map">
<area href="classsmall3d_1_1_file.html" title="Abstract file parser class." alt="small3d::File" shape="rect" coords="0,0,118,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac8812b09eb0d378eef2eb388855fc2a7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsmall3d_1_1_binary_file.html#ac8812b09eb0d378eef2eb388855fc2a7">BinaryFile</a> (const std::string &amp;fileLocation)</td></tr>
<tr class="memdesc:ac8812b09eb0d378eef2eb388855fc2a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classsmall3d_1_1_binary_file.html#ac8812b09eb0d378eef2eb388855fc2a7">More...</a><br /></td></tr>
<tr class="separator:ac8812b09eb0d378eef2eb388855fc2a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a614beda4f638a892e0adc34951446101"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsmall3d_1_1_binary_file.html#a614beda4f638a892e0adc34951446101">load</a> (<a class="el" href="classsmall3d_1_1_model.html">Model</a> &amp;model, const std::string &amp;meshName) override</td></tr>
<tr class="memdesc:a614beda4f638a892e0adc34951446101"><td class="mdescLeft">&#160;</td><td class="mdescRight">Load data from the Wavefront file into a <a class="el" href="classsmall3d_1_1_model.html" title="A 3D model. It can be loaded from a WavefrontFile or GlbFile. It can also be constructed procedurally...">Model</a>.  <a href="classsmall3d_1_1_binary_file.html#a614beda4f638a892e0adc34951446101">More...</a><br /></td></tr>
<tr class="separator:a614beda4f638a892e0adc34951446101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a14df9465b86d38d00bb58bb4022494"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsmall3d_1_1_binary_file.html#a2a14df9465b86d38d00bb58bb4022494">getMeshNames</a> () override</td></tr>
<tr class="memdesc:a2a14df9465b86d38d00bb58bb4022494"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of the names of the meshes contained in the file.  <a href="classsmall3d_1_1_binary_file.html#a2a14df9465b86d38d00bb58bb4022494">More...</a><br /></td></tr>
<tr class="separator:a2a14df9465b86d38d00bb58bb4022494"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classsmall3d_1_1_file"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classsmall3d_1_1_file')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classsmall3d_1_1_file.html">small3d::File</a></td></tr>
<tr class="memitem:a81bb5738b0904d6904ee39a34e710271 inherit pub_methods_classsmall3d_1_1_file"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsmall3d_1_1_file.html#a81bb5738b0904d6904ee39a34e710271">File</a> (const std::string &amp;fileLocation)</td></tr>
<tr class="memdesc:a81bb5738b0904d6904ee39a34e710271 inherit pub_methods_classsmall3d_1_1_file"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor.  <a href="classsmall3d_1_1_file.html#a81bb5738b0904d6904ee39a34e710271">More...</a><br /></td></tr>
<tr class="separator:a81bb5738b0904d6904ee39a34e710271 inherit pub_methods_classsmall3d_1_1_file"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_classsmall3d_1_1_file"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classsmall3d_1_1_file')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classsmall3d_1_1_file.html">small3d::File</a></td></tr>
<tr class="memitem:af2a429b0fc4ae0911a18043da131f2a0 inherit pro_attribs_classsmall3d_1_1_file"><td class="memItemLeft" align="right" valign="top"><a id="af2a429b0fc4ae0911a18043da131f2a0"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsmall3d_1_1_file.html#af2a429b0fc4ae0911a18043da131f2a0">fullPath</a> = &quot;&quot;</td></tr>
<tr class="memdesc:af2a429b0fc4ae0911a18043da131f2a0 inherit pro_attribs_classsmall3d_1_1_file"><td class="mdescLeft">&#160;</td><td class="mdescRight">The path to the file being parsed. <br /></td></tr>
<tr class="separator:af2a429b0fc4ae0911a18043da131f2a0 inherit pro_attribs_classsmall3d_1_1_file"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Native model file loader. The model file loaded has to have been produced by converting a file in a supported format to a <a class="el" href="namespacesmall3d.html">small3d</a> native binary file using the format converter program, s3dfc, produced by this project's build scripts, for example by running s3dfc car.glb car.bin (this would convert a car gltf (.glb) model file to a native binary model file) ATTENTION: Unfortunately the native binary files have issues across architectures. So for example binaries created on Windows do not work on Linux. They need to be created and tested separately for each. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac8812b09eb0d378eef2eb388855fc2a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8812b09eb0d378eef2eb388855fc2a7">&#9670;&nbsp;</a></span>BinaryFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BinaryFile::BinaryFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>fileLocation</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fileLocation</td><td>Path to wavefront file </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2a14df9465b86d38d00bb58bb4022494"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a14df9465b86d38d00bb58bb4022494">&#9670;&nbsp;</a></span>getMeshNames()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::string &gt; BinaryFile::getMeshNames </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a list of the names of the meshes contained in the file. </p>
<dl class="section return"><dt>Returns</dt><dd>The list of mesh names </dd></dl>

<p>Implements <a class="el" href="classsmall3d_1_1_file.html#a1fa8b53546f047cf51793672d1c33bbc">small3d::File</a>.</p>

</div>
</div>
<a id="a614beda4f638a892e0adc34951446101"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a614beda4f638a892e0adc34951446101">&#9670;&nbsp;</a></span>load()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void BinaryFile::load </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classsmall3d_1_1_model.html">Model</a> &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>meshName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Load data from the Wavefront file into a <a class="el" href="classsmall3d_1_1_model.html" title="A 3D model. It can be loaded from a WavefrontFile or GlbFile. It can also be constructed procedurally...">Model</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">model</td><td>The model to load the data to </td></tr>
    <tr><td class="paramname">meshName</td><td>The name of the mesh to load </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classsmall3d_1_1_file.html#a9506a37fb517dc4fe5e2fee67af60934">small3d::File</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_binary_file_8hpp_source.html">BinaryFile.hpp</a></li>
<li>BinaryFile.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
